﻿using System;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using HYRevitCode.DocumentUtiltiy;

namespace HYRevitCode.SampleAndTest
{
	[Transaction(TransactionMode.Manual)]
	public class CmdGetDocumentGuid : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			string text;
			DocumentUtilityMethod.TryGetDocumentGuid(commandData.Application.ActiveUIDocument.Document, out text);
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
